import request from '@/util/request'

export function getMainAccount() {
  return request({
    url: 'aqs/secondary/listSelection.json',
    method: 'GET',
    baseURL: process.env.VUE_APP_AJS_OTHER
  })
}

export function listMainAccountUser() {
  return request({
    url: 'aqs/secondary/listMainAccountUser.json',
    method: 'GET',
    baseURL: process.env.VUE_APP_AJS_OTHER
  })
}

export function getPushAddress() {
  return request({
    url: 'pushAddress/list.json',
    method: 'GET',
    baseURL: process.env.VUE_APP_AJS_MALL
  })
}

export function push(data) {
  return request({
    url: 'push.json',
    method: 'POST',
    data,
    baseURL: process.env.VUE_APP_AJS_MALL
  })
}

export function distance(headers, path) {
  return request({
    url: `push/driving_distance/${path}.json`,
    method: 'GET',
    headers,
    baseURL: process.env.VUE_APP_AJS_MALL
  })
}
